<?php

	class Member_model extends Model {

		protected $__tbname = 'member';
		protected $__dbconf = '';

		var $id;	//int(11)	Primary Key	Auto Increment	NOT NULL
		var $username;	//varchar(30)			NOT NULL
		var $password;	//varchar(50)			NOT NULL
		var $fullname;	//varchar(255)			NULL
		var $email;	//varchar(255)	Unique Key		NULL
		var $sex;	//tinyint(1)			NULL
		var $birthday;	//date			NULL
		var $address;	//text			NULL
		var $indentify;	//varchar(10)			NULL
		var $phone;	//varchar(30)			NULL
		var $mobile;	//varchar(30)			NULL

		protected $__validation_rule = array(
			'id' => array('key' => 'PRI', 'type' => 'int', 'null' => FALSE, 'auto_increment' => TRUE),
			'username' => array('type' => 'varchar', 'size' => 30, 'null' => FALSE),
			'password' => array('type' => 'varchar', 'size' => 50, 'null' => FALSE),
			'fullname' => array('type' => 'varchar', 'size' => 255, 'null' => TRUE),
			'email' => array('key' => 'UNI', 'type' => 'varchar', 'size' => 255, 'null' => TRUE),
			'sex' => array('type' => 'tinyint', 'null' => TRUE),
			'birthday' => array('type' => 'date', 'null' => TRUE),
			'address' => array('type' => 'text', 'null' => TRUE),
			'indentify' => array('type' => 'varchar', 'size' => 10, 'null' => TRUE),
			'phone' => array('type' => 'varchar', 'size' => 30, 'null' => TRUE),
			'mobile' => array('type' => 'varchar', 'size' => 30, 'null' => TRUE)
		);
	}
